<?php
use Illuminate\Database\Eloquent\Model;

class linkModel extends Model
{
	protected $table 		= 'link';
	protected $primaryKey	= 'id';

    protected function serializeDate($date)
    {
        return $date->format('Y-m-d H:i:s');
    }

    public function children ()
    {
        return $this->hasMany(linkModel::class, 'group', 'group')->orderBy('id', 'asc');
    }

}